package com.shop.user.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.shop.po.dto.OrderDetailInfo;
import com.shop.user.po.Orders;
import com.shop.user.po.dto.OrderInfo;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author banxia
 * @since 2023-02-25
 */
public interface OrderService extends IService<Orders> {

    /**
     * 获取订单表的详细情况
     * @param orderId
     * @return
     */
    public OrderInfo getOrderInfo(Long orderId);


    /**
     * 为订单选择优惠券
     * @param orderId：这里是指主键
     *代开发，暂时无法实现。。
     * @param discountId
     */
    public void choiceDiscount(Long orderId,Long discountId);

    /**
     * 生成订单接口
     * @param cartIdList
     * @param remarks:备注
     */
    public void createOrder(List<Long> cartIdList,
                            Long addressId,
                            String remarks);

    public List<OrderInfo> getUserOrders(String state);


    //支付该订单
    public void pay(Long id);

    List<OrderDetailInfo> merchantGetOrderInfo(Long merchantId,String state,Long page,Long size);

    Long merchantGetTotal(Long merchantId, String state);

    void changState(String state, String orderDetailsId);
}
